---@class Table_LuaObjectItem
local Table_LuaObjectItem = class("Table_LuaObjectItem");

function Table_LuaObjectItem:ctor()
    self.Id = 0;    --唯一ID
    self.ScriptView = "";    --View脚本路径
    self.ScriptPanel = "";    --Panel脚本路径
end

function Table_LuaObjectItem:Load(reader)
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.Id = tonumber(self.temp); end
    self.ScriptView = reader:ReadString();
    self.ScriptPanel = reader:ReadString();
    self.temp = nil;
end

---@class Table_LuaObjectMgr : IDataMgr
local Table_LuaObjectMgr = class("Table_LuaObjectMgr", IDataMgr);

function Table_LuaObjectMgr:FileName()
    return "Txt/LuaObject.txt";
end

---@return Table_LuaObjectItem
function Table_LuaObjectMgr:GetItemById(id)
    return self.super:GetItemById(id)
end

---@return Table_LuaObjectItem
function Table_LuaObjectMgr:GetItemByIdx(idx)
    return self.super:GetItemByIdx(idx)
end

function Table_LuaObjectMgr:Load(reader)
    local item = Table_LuaObjectItem.new();
    item:Load(reader);
    self.mItemDic[item.Id] = self.mDataCount;
    table.insert(self.mItemList, item);
end

return Table_LuaObjectMgr;